package rtcf.framework{
	import mx.utils.UIDUtil;
	/**
	 * Credentials is a dynamic object that you can add properties to
	 * as necessary. For example a token property or userName and password
	 * properties. 
	 * Two property names are reserved: guid and date. RTCF requires a
	 * guid and date be included within the credentials object. 
	 * They are especially important when multiple connection attempts
	 * are made against the server by more than one RTCFConnection object.
	 * The server-side RTCF framework will accept one, and only one, connection
	 * request for a given guid.
	 *
	 */
	public dynamic class Credentials{
		public var guid:String; // Unique ID for this connection attempt.
		public var date:Date;   // Date of connection attempt.
		public function Credentials(){
			reset();
		}
		
		/**
		 * reset the guid and date of the credentials prior to making
		 * a new connection attempt for the same or new user.
		 */
		public function reset():void{
			guid =  UIDUtil.createUID();
			date = new Date();
		}

	}
}